<template>
  <avue-crud :data="data"
             :option="option">
    <template #name-desc>
      <p style="color:blue">这是姓名字段的自定义描述信息</p>
    </template>
  </avue-crud>
</template>

<script setup>
import { ref } from 'vue';

const data = ref([
  { name: '张三', sex: '男' },
  { name: '李四', sex: '女' }
]);

const option = {
  column: [
    {
      label: '姓名',
      prop: 'name',
      rules: [
        {
          required: true,
          message: '请输入姓名',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '性别',
      prop: 'sex'
    }
  ]
};
</script>
